package org.lztvn.elearning.service;

import java.util.List;

import org.lztvn.elearning.dao.IContentDao;
import org.lztvn.elearning.dao.INewsDAO;
import org.lztvn.elearning.entities.News;
import org.springframework.transaction.annotation.Transactional;
@Transactional
public class NewsServiceImpl implements INewsService{
	private INewsDAO dao;
	@Override
	public Long addNews(News n) {
		return dao.addNews(n);
	}

	@Override
	public void deleteNews(Long idn) {
		dao.deleteNews(idn);
		
	}

	@Override
	public void modifierNews(News n) {
		dao.modifierNews(n);
		
	}

	@Override
	public News getNews(Long idn) {
		// TODO Auto-generated method stub
		return dao.getNews(idn);
	}

	@Override
	public List<News> listNews() {
		// TODO Auto-generated method stub
		return dao.listNews();
	}

	public INewsDAO getDao() {
		return dao;
	}

	public void setDao(INewsDAO dao) {
		this.dao = dao;
	}

	
}
